<?php /* Smarty version Smarty-3.0.9, created on 2014-01-23 22:04:53
         compiled from "C:/wamp/www/work/templates/t_dark\registrar_producto.tpl" */ ?>
<?php /*%%SmartyHeaderCode:283752e192050f9a36-39512182%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    '15f3760ec7e2f07902e332a9c0446bb6b0a6a067' => 
    array (
      0 => 'C:/wamp/www/work/templates/t_dark\\registrar_producto.tpl',
      1 => 1390514690,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '283752e192050f9a36-39512182',
  'function' => 
  array (
  ),
  'has_nocache_code' => false,
)); /*/%%SmartyHeaderCode%%*/?>
<div>
    <legend>Registrar un Producto</legend>
    <form class="form-horizontal" enctype="multipart/form-data"  action="<?php echo $_smarty_tpl->getVariable('gvar')->value['l_global'];?>
registrar_producto.php?option=registrar" method="post" >
        <table>
            <tr>
                <td> <span class="label label-default">Nombre</span></td>
                <td><input type="text" name="nombre" required="required" class="form-control" placeholder="Nombre"></td>
            </tr>
            <tr>
                <td> <span class="label label-default">Precio</span></td>
                <td><input type="number" name="precio" required="required" step="0.01" min="0" class="form-control" placeholder="Precio"></td>
            </tr>
            <tr>
                <td><span class="label label-default">Categoría</span></td>
                <td>
                    <select name="categoria" class="form-control" placeholder="Categoría">
                        <?php unset($_smarty_tpl->tpl_vars['smarty']->value['section']['i']);
$_smarty_tpl->tpl_vars['smarty']->value['section']['i']['loop'] = is_array($_loop=$_smarty_tpl->getVariable('categoria')->value) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$_smarty_tpl->tpl_vars['smarty']->value['section']['i']['name'] = 'i';
$_smarty_tpl->tpl_vars['smarty']->value['section']['i']['show'] = true;
$_smarty_tpl->tpl_vars['smarty']->value['section']['i']['max'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['loop'];
$_smarty_tpl->tpl_vars['smarty']->value['section']['i']['step'] = 1;
$_smarty_tpl->tpl_vars['smarty']->value['section']['i']['start'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['step'] > 0 ? 0 : $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['loop']-1;
if ($_smarty_tpl->tpl_vars['smarty']->value['section']['i']['show']) {
    $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['total'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['loop'];
    if ($_smarty_tpl->tpl_vars['smarty']->value['section']['i']['total'] == 0)
        $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['show'] = false;
} else
    $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['total'] = 0;
if ($_smarty_tpl->tpl_vars['smarty']->value['section']['i']['show']):

            for ($_smarty_tpl->tpl_vars['smarty']->value['section']['i']['index'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['start'], $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['iteration'] = 1;
                 $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['iteration'] <= $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['total'];
                 $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['index'] += $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['step'], $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['iteration']++):
$_smarty_tpl->tpl_vars['smarty']->value['section']['i']['rownum'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['iteration'];
$_smarty_tpl->tpl_vars['smarty']->value['section']['i']['index_prev'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['index'] - $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['step'];
$_smarty_tpl->tpl_vars['smarty']->value['section']['i']['index_next'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['index'] + $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['step'];
$_smarty_tpl->tpl_vars['smarty']->value['section']['i']['first']      = ($_smarty_tpl->tpl_vars['smarty']->value['section']['i']['iteration'] == 1);
$_smarty_tpl->tpl_vars['smarty']->value['section']['i']['last']       = ($_smarty_tpl->tpl_vars['smarty']->value['section']['i']['iteration'] == $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['total']);
?>
                            <option value="<?php echo $_smarty_tpl->getVariable('categoria')->value[$_smarty_tpl->getVariable('smarty')->value['section']['i']['index']]->get('id');?>
"><?php echo $_smarty_tpl->getVariable('categoria')->value[$_smarty_tpl->getVariable('smarty')->value['section']['i']['index']]->get('nombre');?>
</option>
                        <?php endfor; endif; ?>
                    </select>
                </td>
            </tr>
            <tr>
                <td><span class="label label-default">Imagen</span></td>
                <td><input type="file" name="imagen" required="required" class="filestyle" data-classButton="btn btn-primary"></td>
            </tr>
            <tr>
                <td valign="top"> <span class="label label-default">Descripción</span></td>
                <td><textarea name="descripcion" class="form-control" required="required" rows="4" placeholder="Descripción"></textarea></td>
            </tr>
            <tr>
                <td><button type="submit" name="Registrar" class="btn btn-default">Registrar</button></td>
            </tr>
        </table>
    </form>
</div>
